package com.yunfeng.common.service;

import java.util.List;

import org.springframework.data.jpa.domain.Specification;

import com.yunfeng.common.entity.impl.User;
import com.yunfeng.common.exception.ExistedException;
import com.yunfeng.common.exception.ServiceException;
import com.yunfeng.common.util.Page;

public interface UserService {

	User get(String username);

	List<User> find(Page page, String name);

	void update(User user);

	void updatePwd(User user, String newPwd) throws ServiceException;

	void save(User user) throws ExistedException;

	User get(Long id);

	void delete(Long id) throws ServiceException;

	List<User> findAll(Page page);

	List<User> findAll();

	List<User> findByExample(Specification<User> spec, Page page);
}
